# 匹配单个数字或者字符

import re

print(re.search("he[0-9]llo", "he9llo"))  # <re.Match object; span=(0, 6), match='he9llo'>
print(re.search("hel[a-z]lo", "helklo"))  # <re.Match object; span=(0, 6), match='helklo'>
print(re.search("hello\d", "hello87"))  # <re.Match object; span=(0, 6), match='hello8'>
print(re.search("hello\D", "hello$#"))  # <re.Match object; span=(0, 6), match='hello$'>
print(re.search("hello\w", "hello98"))  # <re.Match object; span=(0, 6), match='hello9'>
print(re.search("hello\W", "hello&%"))  # <re.Match object; span=(0, 6), match='hello&'>
